﻿//显示窗口
ShowLayer = function (title, width, height, content, ismax = "0") {
    var lyer = layer.open({
        type: 2,
        title: title,
        shadeClose: false,
        shade: 0.6,
        maxmin: false,
        area: [width, height],
        content: content
    });
    if (ismax == "1") {
        layer.full(lyer);
    }
    return lyer;
}

ParentShowLayer = function (title, width, height, content, ismax = "0") {    
    var lyermax = parent.layer.open({
        type: 2,
        title: title,
        shadeClose: false,
        shade: 0.6,
        maxmin: true,
        area: [width, height],
        content:content
    });
    if (ismax == "1") {
        parent.layer.full(lyermax);
    }
    return lyermax;
}

//运行
RunProject = function (project) {
    ShowLayer("<i class=\"fa fa-play text-green\"></i> 运行", "400px", "600px", "/pages/sys/run.aspx?project=" + project);
}

//预览生成
ShowPreview = function (project, docs) {
    var index = ParentShowLayer("预览", "800px", "800px", "/pages/sys/preview.aspx?project=" + project + "&docs=" + docs, "0");
    layer.iframeAuto(index);
}